<template>

	<!-- 搜索栏 -->
	<view>
		<uni-search-bar v-model="param.volunteerName" clearButton="auto" cancelButton="none" radius="20"
			@confirm="getManageList" @clear="cancel_search" bgColor="#f5f5f5" placeholder="输入志愿者姓名">
		</uni-search-bar>
	</view>
	<!-- 队伍列表 -->



</template>

<script setup>
	import {
		onLoad,
		onReachBottom
	} from "@dcloudio/uni-app"
	import {
		imgURL2
	} from '../../api/request';
	import {
		reactive,
		ref
	} from 'vue';
	import {
		getManageList
	} from '@/api/team/team.ts'
	// // 列表请求参数
	const param = ref({
		current: 1,
		size: 10,
		teamId: 1,
		volunteerName: "",
		orderByJoinDateDesc: true,
		orderByWorkHourDesc: true
	})
	// 管理员列表数据
	const manageList = ref([])
	// 滑动单元格
	const options = reactive([{
		text: '删除',
		style: {
			backgroundColor: '#f56c6c'
		}
	}])
	onLoad(() => {
		// 获取队伍列表
		getManageLists()
	})
	// 获取队伍列表
	const getManageLists = () => {
		getManageList(param.value).then(res => {
			if (res.code == 200) {
				manageList.value = res.data.teamMemberList
				console.log('manageList.value' + JSON.stringify(manageList.value))
			}
		})
	}
	// 取消搜索
	const cancel_search = () => {
		param.value.volunteerName = ''
		getManageList()
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}

	.container {
		width: 100%;
		height: 100%;
	}

	.uv-page {
		padding: 0;
	}

	.uv-demo-block__title {
		padding: 10px 0 2px 15px;
	}

	.swipe-action {
		&__content {
			padding: 25rpx 0;

			&__text {
				font-size: 15px;
				color: #222;
				padding-left: 30rpx;
			}
		}
	}
</style>